home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / ct_xmp15 / d4gexam.asm < prev    next >
Assembly Source File  |  1996-09-15  |  1KB  |  77 lines

  1. .386
  2. .model flat
  3. locals
  4.  
  5. .stack 1000h
  6.  
  7. .data?
  8. mxmdata db 4000h dup (?)
  9.  
  10. .data
  11.  
  12. copyright db "mxmplay asm example  (c) '95/96 Niklas Beisert / pascal",10,10,13,'$'
  13. playing db 'playing "at0mic playboys" by Screamager... press any key to stop.$'
  14. byebye db 13,10,'thanks for listening',13,10,'$'
  15. __psp dw 0
  16.  
  17. module label byte
  18. include atomic.inc
  19.  
  20. .code
  21.  
  22. include mxmplay.inc
  23.  
  24. start:
  25.   jmp cmain
  26.   db 'WATCOM'
  27. cmain:
  28.   mov __psp,es
  29.   sti
  30.   cld
  31.   push ds
  32.   pop es
  33.  
  34.   mov ah,9
  35.   lea edx,copyright
  36.   int 21h
  37.  
  38.   movzx eax,__psp
  39.   call xmpGetEnvPtrDPMI_
  40.   call xmpGetGUSPort_
  41.   lea ebx,mxmdata
  42.   mov ecx,65536
  43.   lea esi,module
  44.   mov dl,MXMINTMODEDOS
  45.   call xmpInit_
  46.  
  47.   xor eax,eax
  48.   call xmpPlay_
  49.  
  50.   mov ah,9
  51.   lea edx,playing
  52.   int 21h
  53.  
  54.   mov ah,7
  55.   int 21h
  56.  
  57. @@flush:
  58.     mov ah,11
  59.     int 21h
  60.     cmp al,0
  61.     je @@bye
  62.     mov ah,7
  63.     int 21h
  64.   jmp @@flush
  65.  
  66. @@bye:
  67.   mov ah,9
  68.   lea edx,byebye
  69.   int 21h
  70.  
  71.   call xmpStop_
  72.  
  73.   mov ax,4c00h
  74.   int 21h
  75.  
  76. end start
  77.